<div class="form">

<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'cad-roles-form',
	'enableAjaxValidation'=>false,
)); ?>

	<p class="note">Os campos com <span class="required">*</span> são obrigatórios.</p>

	<?php echo $form->errorSummary($model); ?>

	<div class="row">
		<?php echo $form->labelEx($model,'perfil'); ?>
		<?php  echo $form->dropDownList($model,'perfil',cad_grupos::loadTableGrupos()); ?>
		<?php echo $form->error($model,'perfil'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'table'); ?>
	        <?php echo $form->dropDownList($model,'table', cad_roles::findtables()); ?>
		<?php echo $form->error($model,'table'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'permission'); ?>
		<?php echo $form->textArea($model,'permission',array('size'=>60,'maxlength'=>250)); ?>
		<?php echo $form->error($model,'permission'); ?>
	</div>

	<div class="row buttons">
		<?php echo CHtml::submitButton($model->isNewRecord ? 'Salvar' : 'Salvar'); ?>
	</div>

<?php $this->endWidget(); ?>

</div><!-- form -->